<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>数组对象解构</title>
</head>
<body>
  <script>
    const arr=[{
       name:'佩奇',
       family:{
       mother:'猪妈妈',
       father:'猪爸爸',
       sister:'乔治'
       },
       age:6
    }]
    const [{name:username,family:{mother,father,sister}}]=arr
    console.log(username,mother,father,sister)
  </script>
</body>
</html>